<a href="javascript:;">
    <img id="bannerImg" src="https://img.zcool.cn/community/014bc95af50428a8012160450b7270.jpg@2o.jpg"
         style="width:100%;height:150px;"
         class="pui-img-responsive"
    />
</a>
<script type="text/javascript" src="/planeui/app/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
    $(function () {
        var pathName = window.location.pathname;
        console.log("--"+pathName);
        loadBannerImg(pathName);
    });

    function loadBannerImg(pathName){
        $.ajax({
            url: "/home/common/banner",
            method:"GET",
            data:{pathName: pathName},
            success:function (data) {
                $("#bannerImg").attr("src",data);
            }
        });
    }
</script>